package main

import (
	"github.com/labstack/echo"
	"github.com/labstack/echo/middleware"
	"mlgmd.com/hearsay/api"
	"mlgmd.com/hearsay/base"
	"os"
	"strconv"
)

func main() {
	//go func() {
	//	for true {
	//		go api.Freeze()
	//		time.Sleep(24 * time.Hour)
	//	}
	//}()
	base.Must(os.MkdirAll(base.WorkDir+"upload/", 0777))
	base.Must(os.MkdirAll(base.WorkDir+"temp/", 0777))

	e := echo.New()
	e.Pre(middleware.CORS())
	api.Route(e)
	e.Logger.Fatal(e.Start(":" + strconv.Itoa(base.Config.ServerPort)))
}

type Type struct {
	Name string
}

func (t *Type) GetName() string {
	return t.Name
}

type IType interface {
	GetName() string
}
